home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 8 / Night Owl CD-ROM (NOPV8) (Night Owl Publisher) (1993).ISO / 034a / aecur101.arj / CONTRIB / CURSES / SRC / AZTECSUB.C < prev    next >
C/C++ Source or Header  |  1990-03-09  |  824b  |  44 lines

  1. /**********************************************************************
  2.  *  
  3.  *  aztecsub.c
  4.  *  
  5.  *  copyright (c) 1988,89,90 J. Alan Eldridge
  6.  *
  7.  *  subroutine(s) needed by Curses which Aztec C does not supply
  8.  *  
  9.  *********************************************************************/
  10.  
  11. #include "curses.h"
  12.  
  13. #include <stdarg.h>
  14.  
  15. #if AZTEC
  16.  
  17. /**********************************************************************
  18.  *  
  19.  *  vsprintf()
  20.  *  
  21.  *  like sprintf(), except gets a pointer to the args
  22.  *  
  23.  *********************************************************************/
  24.  
  25. static char *cp;
  26.  
  27. static int
  28. sputc(int c)
  29. {
  30.     *cp++ = c;
  31. }
  32.     
  33. int
  34. vsprintf(
  35.     char    *buf,
  36.     char    *fmt,
  37.     va_list args)
  38. {
  39.     cp = buf;
  40.     return format(sputc, fmt, args);
  41. }
  42.  
  43. #endif  /* AZTEC */
  44.